<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>test: TEST/student.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">test
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.7 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_60f03a562a2e326bd289c232b1b46d6c.html">TEST</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">student.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="student_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* COPYRIGHT NOTICE</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Copyright (c) 2014 MPIG</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * All rights reserved.</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#ifndef  _STUDENT_H_</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#define  _STUDENT_H_</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include  &quot;<a class="code" href="_person_8h.html">Person.h</a>&quot;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include  &lt;string&gt;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">using namespace </span>std;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="class_student.html">   34</a></span>&#160;<span class="keyword">class  </span><a class="code" href="class_student.html">Student</a> :<span class="keyword">virtual</span> <span class="keyword">public</span> <a class="code" href="class_person.html">Person</a> </div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;{   </div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="keywordtype">char</span> *Department;        </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="keywordtype">char</span> *Speciality;       </div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>   Number; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keywordtype">void</span>  Init(<span class="keywordtype">char</span>*, <span class="keywordtype">char</span>*, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>);</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="class_student.html#af9168cedbfa5565cf0b20c1a9d3f5c9d">   54</a></span>&#160;    <a class="code" href="class_student.html#af9168cedbfa5565cf0b20c1a9d3f5c9d">Student</a>(){Init(0, 0, 0L);}      <span class="comment">//默认构造函数</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <a class="code" href="class_student.html">Student</a>(<span class="keywordtype">char</span>*, <span class="keywordtype">int</span>, <span class="keywordtype">char</span>, <span class="keywordtype">char</span>*, <span class="keywordtype">char</span>*, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>);         <span class="comment">//构造函数</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <a class="code" href="class_student.html">Student</a>(<a class="code" href="class_student.html">Student</a>&amp;s){Init(s.Department, s.Speciality, s.Number); }<span class="comment">//拷贝构造函数</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <a class="code" href="class_student.html">Student</a>(<span class="keywordtype">char</span> *d, <span class="keywordtype">char</span> *s, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> n) {Init(d, s, n);}         <span class="comment">//重载的构造函数</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="class_student.html#a54a8ea060d6cd04222c3a2f89829f105">   62</a></span>&#160;    <a class="code" href="class_student.html#a54a8ea060d6cd04222c3a2f89829f105">~Student</a>()  {<span class="keyword">delete</span> Department; <span class="keyword">delete</span> Speciality;  }       </div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keywordtype">void</span>  SetDep(<span class="keywordtype">char</span>*);                </div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordtype">void</span>  SetSpec(<span class="keywordtype">char</span>*);               </div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="class_student.html#aa2796bed91cdded89cdb86140bc24b46">   77</a></span>&#160;    <span class="keywordtype">void</span>  <a class="code" href="class_student.html#aa2796bed91cdded89cdb86140bc24b46">SetNum</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> num)     </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;     {Number = num;}        </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keywordtype">char</span>  *GetDep(<span class="keywordtype">char</span>*);               </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordtype">char</span>  *GetSpec(<span class="keywordtype">char</span>*);              </div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="class_student.html#a9a44f5fe2e633aa0377e3b5217dfe609">   93</a></span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>   <a class="code" href="class_student.html#a9a44f5fe2e633aa0377e3b5217dfe609">GetNum</a>()            </div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    {<span class="keywordflow">return</span> Number;}            </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;};</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="class_student_html_af9168cedbfa5565cf0b20c1a9d3f5c9d"><div class="ttname"><a href="class_student.html#af9168cedbfa5565cf0b20c1a9d3f5c9d">Student::Student</a></div><div class="ttdeci">Student()</div><div class="ttdoc">构造函数 </div><div class="ttdef"><b>Definition:</b> student.h:54</div></div>
<div class="ttc" id="_person_8h_html"><div class="ttname"><a href="_person_8h.html">Person.h</a></div><div class="ttdoc">该文件定义了一个普通人的类 </div></div>
<div class="ttc" id="class_student_html"><div class="ttname"><a href="class_student.html">Student</a></div><div class="ttdoc">这是一个学生类，继承于person </div><div class="ttdef"><b>Definition:</b> student.h:34</div></div>
<div class="ttc" id="class_student_html_a9a44f5fe2e633aa0377e3b5217dfe609"><div class="ttname"><a href="class_student.html#a9a44f5fe2e633aa0377e3b5217dfe609">Student::GetNum</a></div><div class="ttdeci">unsigned long GetNum()</div><div class="ttdef"><b>Definition:</b> student.h:93</div></div>
<div class="ttc" id="class_student_html_aa2796bed91cdded89cdb86140bc24b46"><div class="ttname"><a href="class_student.html#aa2796bed91cdded89cdb86140bc24b46">Student::SetNum</a></div><div class="ttdeci">void SetNum(unsigned long num)</div><div class="ttdef"><b>Definition:</b> student.h:77</div></div>
<div class="ttc" id="class_student_html_a54a8ea060d6cd04222c3a2f89829f105"><div class="ttname"><a href="class_student.html#a54a8ea060d6cd04222c3a2f89829f105">Student::~Student</a></div><div class="ttdeci">~Student()</div><div class="ttdef"><b>Definition:</b> student.h:62</div></div>
<div class="ttc" id="class_person_html"><div class="ttname"><a href="class_person.html">Person</a></div><div class="ttdoc">提供一个基类 </div><div class="ttdef"><b>Definition:</b> Person.h:34</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2014年 十二月 29日 星期一 19:28:15 , 为 test使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.7
</small></address>
</body>
</html>
